package controllers;

import play.mvc.Catch;
import play.mvc.Controller;

import com.google.gson.JsonObject;

public class CatchError extends Controller {

	@Catch(value = Exception.class)
	public static void generalExceptions(Exception exp) {
		sendErrors();
	}

	public static void sendErrors() {
		JsonObject res = new JsonObject();
		res.addProperty("error", true);
		renderJSON(res.toString());
	}
}
